﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 银行
{
    class User
    {
        public string Username { get; set; }
        public float Balance { get; set; }

        public User(string username)
        {
            Username = username;
        }

        public void Save(float saveMoney)
        {
            Balance += saveMoney;
        }

        public void Get(float getMoney)
        {
            if (getMoney > Balance) throw new ArgumentOutOfRangeException("取款金额大于余额，请重新输入");
            Balance -= getMoney;
        }

        internal static void save(float save)
        {
            throw new NotImplementedException();
        }
    }
}
